package com.marvels.approve.manager.service;

import java.util.List;

import com.marvels.approve.loan.dto.McamLoanApplyInfoDTO;
import com.marvels.approve.manager.dto.OpinionDTO;
import com.marvels.approve.manager.dto.OpinionTypeDTO;
import com.marvels.approve.process.dto.LoanApplyCaseDTO;
import com.marvels.common.exception.MarvelsBusinessException;

public interface IOpinionService {
	
	/**保存
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public OpinionDTO saveOpinion(OpinionDTO opinion)throws MarvelsBusinessException;
	
	/**征信，审批，审计 保存
	 * @param loanApplyCase   流程管理对象
	 * @param loanApplyInfo   进件数据
	 * @param processOpinions   复核意见
	 * @param violationOpinion  违例
	 * @param returnAppOpinions  退单到前端APP类型
	 * @param refuseOpinionTypes  拒绝代码
	 * @param opinionContent  审批意见
	 * @param violationOptionContent  违例
	 * @param returnAppOpinionContent 退单到前端APP类型
	 * @throws MarvelsBusinessException
	 */
	public void saveOpinions(LoanApplyCaseDTO loanApplyCase , McamLoanApplyInfoDTO loanApplyInfo,String caseResult,
			List<OpinionTypeDTO> processOpinions,String violationOpinion,List<OpinionTypeDTO> returnAppOpinions,List<OpinionTypeDTO> refuseOpinionTypes,
			String opinionContent , String violationOptionContent ,String returnAppOpinionContent) throws MarvelsBusinessException;
	
	/**查询意见
	 * @param opinion
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<OpinionDTO> findOpinions(OpinionDTO opinion)throws MarvelsBusinessException;
	
	/**
	 * 查询loan id下当前case版本当前节点下的审批结果
	 * @param opinion
	 * @return
	 */
	List<OpinionDTO> selectOpinionsByCaseVersion(LoanApplyCaseDTO loanApplyCase) throws MarvelsBusinessException;
	
	/**
	 * 根据loan id查询单据的征信、审批、审计的审批结果日志
	 * @param loanApplyCase
	 * @return
	 * @throws MarvelsBusinessException
	 */
	List<OpinionDTO> selectApproveResultLogByLoanId(LoanApplyCaseDTO loanApplyCase)throws MarvelsBusinessException;
}
